package com.qf.controller;
import com.qf.entity.User;
import com.qf.service.UserService;
import com.qf.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api")
public class FindAllUserController {
    @Autowired
    private UserService userService;

    @GetMapping("/findAllUser")
    public R findAllUser() {
        List<User> users = userService.findAll();
        return R.ok(users);
    }
}